/*
 * Copyright (c) 2024-present HBIS Digital Technology Co.,Ltd. All rights reserved.
 */
package com.hbisdt.cet.sample.controller;

import com.hbisdt.cet.sample.entity.ResponseData;
import com.hbisdt.cet.sample.entity.dto.LoginRequest;
import com.hbisdt.cet.sample.service.ILoginService;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 登录控制器
 *
 * @author : 教学示例
 * @version : 1.0
 * @date : 2024-12-24 15:32
 */
@RestController
public class LoginController {

    @Resource
    private ILoginService loginService;

    /**
     * 路由页面-编辑
     *
     * @return java.lang.String
     * @author : 教学示例
     */
    @PostMapping("/login")
    public ResponseData<?> login(@RequestBody LoginRequest loginRequest) {
        return loginService.login(loginRequest);
    }

}
